package com.dongdongshop.controller;

import com.dongdongshop.data.Result;
import com.dongdongshop.service.OrderService;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    //订单
    @PostMapping("createOrder")
    public Result createOrder(@RequestParam Long addrId,@RequestParam Integer payType,
                              @RequestHeader String AutharizeToken){
        orderService.createOrder(addrId,payType,AutharizeToken);
        return Result.OK();
    }

}
